package java_zuoye_3;

import java.util.Random;

public class homework_5 {
	public static void main(String[] args) {
		Random r = new Random();
		int[][] arr = new int[5][5];
		int flag = 1;
		for(int i = 0;i < 5; i++) {
			for(int j = 0;j < 5; j++) {
				arr[i][j] = r.nextInt(100);
			}
		}
		for(int i = 0;i < 5; i++) {
			for(int j = 0;j < 5; j++) {
				System.out.print(arr[i][j] + " ");
			}
			System.out.println();
		}
		for(int i = 0;i < 5; i++) {
			for(int j = 0; j < 5; j++) {
				if(arr[i][i] < arr[i][j] || arr[i][i] < arr[j][i]) {
					flag = 0;
				}
			}
			if(flag == 1) {
				System.out.println(arr[i][i] + " yes");
			}else {
				System.out.println(arr[i][i] + " no");
				flag = 1;
			}
		}
	}
}
